Skip to content

feat(runtime): unify active-turn steering across clients - #1979

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:feat/cli-steering-convergence
Aug 2, 2026
Merged

feat(runtime): unify active-turn steering across clients#1979
limityan merged 1 commit into
GCWing:mainfrom
limityan:feat/cli-steering-convergence

Conversation

@limityan

@limityan limityan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a text-only active-turn steering operation to the stable Agent Runtime port, then route Core, Desktop, Dispatch, Embedded TUI, and Shared TUI through that single owner.
  • Make ordinary Enter in the busy CLI/TUI steer the exact active turn while keeping slash-command and Shell-mode behavior unchanged. Rich drafts fail closed and remain editable.
  • Reuse the GUI's existing PendingQueue owner: preserve full queued payloads during explicit drain and keep images or structured metadata queued instead of flattening them into text.
  • Version the private Shared TUI IPC to v13, validate exact session/turn identities, and render optimistic steering inline with authoritative event deduplication.

Competitor alignment

  • OpenCode 1882c33827cf0ce5c948b69ab5a87ed8f6790cf8: regular TUI submission uses the normal prompt path and Core defaults delivery to steer; App follow-up defaults to steering.
  • Codex 2b5bdcf67547860f2e5c5a605009a70026796b2b: an ordinary user turn first attempts active-turn steering and only uses turn start/fallback when steering is not applicable.
  • BitFun therefore keeps the native Enter flow and does not add a /steer command. This slice remains intentionally text-only; images, workspace references, and structured GUI metadata are preserved for regular turn submission.

Architecture

  • AgentDialogTurnPort is the only steering boundary; the old Core compatibility bypass is removed.
  • Core acceptance uses the existing per-session operation lock plus the authoritative active-turn store, and rejects stale or mismatched turns.
  • Shared TUI admission stays private and connection-scoped; invalid runtime result kinds or identities close the connection rather than acknowledging an ambiguous mutation.
  • GUI queue lifecycle and persistence remain owned by the existing PendingQueueManager; no second queue or delivery state machine is introduced.
  • No Relay changes are included.

Verification

Passed locally:

  • cargo check --workspace
  • Core feature checks for workspace-runtime, remote-workspace, ssh-remote, and --no-default-features
  • Runtime Ports steering contract: 1 test
  • Agent Runtime steering: 3 tests
  • Shared TUI IPC steering: 3 tests
  • Core steering: 5 tests
  • CLI steering: 5 tests
  • cargo check -p bitfun-desktop
  • Web lint and type-check (lint has 2 pre-existing warnings)
  • PendingQueue focused tests: 2 tests
  • i18n audit and Core boundary checks

Environment notes:

  • The full Web suite passed 376/377 files and 2570/2571 tests locally. The remaining unrelated Remote Connect source-contract test hard-matches LF while this Windows checkout materializes the unchanged source as CRLF.
  • cargo test -p bitfun-desktop was attempted after the check passed but the machine ran out of D: drive space while compiling third-party dependencies; no test assertion or PR compiler error was reached.

@limityan
limityan merged commit 52271fb into GCWing:main Aug 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant